-- @owner: lihongji
-- @date: 2022/6/15
-- @testpoint: 建表

--step1: 建表     expect: 建表成功
drop table if exists t_ustore_corr_0002_01 cascade;
create table  t_ustore_corr_0002_01(
     col_1 integer,
     col_2 bigint,
     col_3 float8,
     col_4 decimal(12,6),
     col_5 bool,
     col_6 char(30),
     col_7 varchar2(50),
     col_8 varchar(30),
     col_9 interval day to second,
     col_10 timestamp,
     col_11 date,
     col_12 date,
     col_13 timestamp without time zone,
     col_14 blob,
     col_15 clob,
     col_16 int[]
) with (storage_type=ustore);


--step2:创建序列     expect: 创建成功
drop sequence if exists pop_samp_variance_seq_corr;
create sequence pop_samp_variance_seq_corr increment by 1 start with 10;

--step3:清空表数据   expect: 清空成功
truncate table t_ustore_corr_0002_01;

--step4:数据创造    expect：成功
begin
	for i in 1..50 loop
      insert into t_ustore_corr_0002_01 values(
	  i,
      pop_samp_variance_seq_corr.nextval,
	  i+445.255,
	  98*0.99*i,
	  true,
	  lpad('abc','30','@'),
	  lpad('abc','30','b'),
	  rpad('abc','30','e'),
	  (interval '4 5:12:10.222' day to second(3)),
	  to_timestamp('2019-01-03 14:58:54.000000','yyyy-mm-dd hh24:mi:ss.ffffff'),
	  '2019-01-03 15:19:00',
	  '2019-01-03 15:19:00',
	  '2019-01-03 15:19:00',
	  lpad('10',12,'01010')::blob,
	  rpad('abc','9','a@123&^%djgk')::clob,
	  '{32,535,5645645,6767,76,67,56,48,979,978,7}'
	  );
    end loop;
end;
/

--step5: 插入数据      expect: 成功
insert into t_ustore_corr_0002_01 select * from t_ustore_corr_0002_01;
insert into t_ustore_corr_0002_01 select * from t_ustore_corr_0002_01;
